package com.xomily.devops.domain;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xomily.common.annotation.Excel;
import com.xomily.common.core.domain.BaseEntity;

/**
 * 系统告警对象 dev_alarm
 * 
 * @author xomily
 * @date 2021-12-09
 */
public class DevAlarm extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 主机IP地址 */
    @Excel(name = "主机IP地址")
    private String ip;

    /** 告警码 */
    @Excel(name = "告警码")
    private String code;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 日志内容 */
    @Excel(name = "日志内容")
    private String content;

    /** 级别(0-普通 1-严重) */
    @Excel(name = "级别(0-普通 1-严重)")
    private String level;

    /** 状态(0-未处理 1-已处理) */
    @Excel(name = "状态(0-未处理 1-已处理)")
    private String status;
    
    /** 告警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alarmTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setLevel(String level) 
    {
        this.level = level;
    }

    public String getLevel() 
    {
        return level;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public Date getAlarmTime()
    {
        return alarmTime;
    }

    public void setAlarmTime(Date alarmTime)
    {
        this.alarmTime = alarmTime;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ip", getIp())
            .append("code", getCode())
            .append("type", getType())
            .append("content", getContent())
            .append("level", getLevel())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("alarmTime", getAlarmTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
